{% extends 'layout.html' %}

{% block content %}
    <div>
        <div class="container">

            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">Add User</h3>
                </div>
                <div class="panel-body">

                    <form class="form-horizontal" method="post" novalidate>
                        {% csrf_token %}

                        {% for field in form %}
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{{ field.label }}</label>
                                <div class="col-sm-10">
                                    {{ field }}
                                    <span style = "color:red">{{ field.errors }}</span>
                                </div>
                            </div>
                        {% endfor %}

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary">Submit</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>


    </div>
{% endblock %}
